'use strict';

/**
 * @ngdoc overview
 * @name mytodoApp
 * @description
 * # mytodoApp
 *
 * Main module of the application.
 */
angular
    .module('myTimeLine')
    .directive('timeline',timeline)
    .directive('timelineEvent',timelineEvent)
    .directive('timelineHeader',timelineHeader);

function dr_Loading() {
    var directive = {
        restrict: 'AE',
        template: '<div class="loading"><div class="double-bounce1"></div><div class="double-bounce2"></div></div>'
    };
    return directive;
};
function timeline(){
	var directive={ 
		   restrict: 'AE',
	 	   transclude: true,
	  	   template: '<ul class="timeline" ng-transclude></ul>',
	       controller: function($scope,$element,$transclude,$log) {
	       	// console.log($scope,$element,$transclude,$log);
	       	// $transclude(function(){
	       	// 	var a=angular.element('<a>');
	       	// 	a.attr('href','www.baidu.com');
	       	// 	a.text('hello 这是一个a标签');
	       	// 	$element.append(a);
	       	// })
	       }

		}	
	return directive;
}
function timelineEvent(){
	return {
		require:'^timeline',
		restrict:'AE',
		transclude:true,
		template:'<li ng-class-odd="oddClass" ng-transclude ng-class-even="evenClass">\
				</li>',
		link:function(scope,element,attrs,controller){

		}
	}
}
function timelineBadge(){
	return {
		require:'^timelineEvent',
		restrict:'AE',
		template:'<div class="timeline-badge" ng-transclude></div>'
	}
}
function timelineHeader(){
	var directive={ 
		  require: '^timelinePanel',
		  restrict: 'AE',
		  transclude: true,
		  template: '<div class="timeline-header" ng-transclude></div>'
		}
	return directive;
}
function timelinePanel(){
	var directive={ 
		   require: '^timeline',
		    restrict: 'AE',
		    transclude: true,
		    template: '<div class="timeline-panel" ng-transclude></div>'
		}
	return directive;
}
function timelinefooter(){
	var directive={ 
		 require: '^timelinePanel',
	    restrict: 'AE',
	    transclude: true,
	    template: '<div class="timeline-footer" ng-transclude></div>'
	}
	return directive;
}